# AprilCalib log 8
# CalibRig::mode=2d
# @ Mon Nov 25 12:08:30 2019

from numpy import array
U=array([[397.7850036621094, 290.0701599121094, 373.2154846191406, 254.7133331298828, 345.6304016113281, 418.8587646484375, 395.6158752441406, 314.5423889160156, 439.263671875, 280.0880432128906, 368.8912658691406, 338.9808349609375, 391.7746887207031, 437.3307189941406, 363.0790100097656, 413.412353515625, 331.1495361328125, 386.2657165527344, 355.9959411621094],
       [179.2682495117188, 193.6549224853516, 194.0184936523438, 213.2542877197266, 211.0418853759766, 210.50390625, 227.1696472167969, 230.1187591552734, 241.9169769287109, 251.5261688232422, 245.8232421875, 267.0114440917969, 280.9149780273438, 292.7914123535156, 303.6452026367188, 314.6656494140625, 328.9613342285156, 339.1944274902344, 365.3304443359375]], dtype='float64');
Xw=array([[899.5044555664063, 299.5044555664063, 699.5044555664063, 99.50446319580078, 499.5044555664063, 899.5044555664063, 699.5044555664063, 299.5044555664063, 899.5044555664063, 99.50446319580078, 499.5044555664063, 299.5044555664063, 499.5044555664063, 699.5044555664063, 299.5044555664063, 499.5044555664063, 99.50446319580078, 299.5044555664063, 99.50446319580078],
       [299.5044555664063, 99.50446319580078, 299.5044555664063, 99.50446319580078, 299.5044555664063, 499.5044555664063, 499.5044555664063, 299.5044555664063, 699.5044555664063, 299.5044555664063, 499.5044555664063, 499.5044555664063, 699.5044555664063, 899.5044555664063, 699.5044555664063, 899.5044555664063, 699.5044555664063, 899.5044555664063, 899.5044555664063],
       [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], dtype='float64');
# After LM:
K=array([[427.6679915937332, 0, 313.1837208243725],
       [0, 426.3104445922166, 250.1454460366836],
       [0, 0, 1]], dtype='float64');
distCoeffs=array([-0.3809494904304465,
       0.1288229093688364,
       0.0008848789408641528,
       -0.008786298335116287,
       0], dtype='float64');
CovK=array([[0.05723031059355713, 0.0546318873029637, -0.0171680437186273, -0.01504282565940449, -0.0001318953122158035, 0.0002004926075191885, 7.23007400030761e-06, 1.051292063501156e-05, -8.42904252176845e-05],
       [0.05463188730292336, 0.05311286777070841, -0.01579380423471745, -0.01267221019948163, -0.0001257083950942186, 0.0001900254274990836, 6.375229705334309e-06, 9.995666466289063e-06, -7.984579953975373e-05],
       [-0.01716804371907903, -0.01579380423518546, 0.03363650011182415, 0.007101181091463404, 2.978627841783809e-05, -5.125334756080945e-05, -1.848331896185177e-06, -1.246448408836734e-05, 3.655990995128143e-05],
       [-0.01504282565980313, -0.01267221019987155, 0.00710118109177821, 0.0342772055015518, 3.347876010297464e-05, -4.845158947689547e-05, -1.124531781569531e-05, -4.302183567376362e-06, 6.138066376611766e-06],
       [-0.0001318953122157261, -0.0001257083950942297, 2.978627841686218e-05, 3.34787601021607e-05, 6.885017834110946e-07, -1.441608988653511e-06, -1.797448412240706e-08, -2.261028252422651e-08, 8.210254510852335e-07],
       [0.00020049260751928, 0.0001900254274992473, -5.125334755933792e-05, -4.845158947572493e-05, -1.441608988653927e-06, 3.547674570275371e-06, 3.594088372981941e-08, 2.836504469518803e-08, -2.212807811304636e-06],
       [7.230074000409835e-06, 6.375229705436777e-06, -1.848331896251929e-06, -1.124531781569776e-05, -1.797448412262085e-08, 3.594088373011327e-08, 5.63981997698186e-09, 1.373148444904665e-09, -1.22600769549522e-08],
       [1.051292063517575e-05, 9.995666466461239e-06, -1.246448408836724e-05, -4.30218356725509e-06, -2.261028252457504e-08, 2.836504469566548e-08, 1.373148444878074e-09, 7.997583299713969e-09, -1.609127820195158e-08],
       [-8.429042521786823e-05, -7.984579953994515e-05, 3.655990995058951e-05, 6.138066376000055e-06, 8.210254510857221e-07, -2.212807811305177e-06, -1.226007695481154e-08, -1.609127820174265e-08, 1.473382783597395e-06]], dtype='float64');
# rms=0.332793
r0=array([0.1607064942630686,
       0.1661231529529213,
       -1.951405858479914], dtype='float64');
t0=array([-622.4133130213027,
       712.5406875694786,
       1981.084877155317], dtype='float64');
Covr0=array([[4.082159662188262e-07, -3.791670657041372e-08, 2.45492587514445e-08],
       [-3.791670656850713e-08, 2.949527865518896e-07, 3.579032764546957e-08],
       [2.454925875157047e-08, 3.579032764514846e-08, 1.278124466252521e-08]], dtype='float64');
Covt0=array([[0.7268760543113686, 0.1746870584602638, 0.3832911440810318],
       [0.1746870584672705, 0.7303576723185079, 0.05645107346739402],
       [0.3832911440674597, 0.05645107345757938, 1.148154662262695]], dtype='float64');
r1=array([-0.1695160599933548,
       0.07168174047014168,
       -0.03297211309183897], dtype='float64');
t1=array([-627.9779511838798,
       -575.9047520202854,
       1796.588731380361], dtype='float64');
Covr1=array([[2.04116764973998e-07, -1.471899696984301e-08, -9.010535161159467e-09],
       [-1.471899696921495e-08, 1.656880002754904e-07, 1.622828740001326e-08],
       [-9.010535161078936e-09, 1.622828740002956e-08, 5.132654096399415e-09]], dtype='float64');
Covt1=array([[0.5892891476604816, 0.1178268112009725, 0.4308091896506417],
       [0.1178268112063475, 0.5844607930197353, 0.3663268333873346],
       [0.4308091896435022, 0.3663268333798201, 1.141914373210067]], dtype='float64');
r2=array([-0.1179079699562944,
       -0.05793587847840076,
       0.6872341579410962], dtype='float64');
t2=array([-123.1824862717305,
       -1132.22438610728,
       1647.467208547695], dtype='float64');
Covr2=array([[2.120300583341164e-07, 1.982231727059226e-09, -8.127722187519824e-09],
       [1.982231727871915e-09, 1.842850032496516e-07, 2.236802128481305e-08],
       [-8.127722187406078e-09, 2.236802128483633e-08, 6.442868047773982e-09]], dtype='float64');
Covt2=array([[0.5319218894470611, 0.1079033843228796, 0.3214546624425041],
       [0.1079033843277203, 0.5169250834053046, 0.4413431944782771],
       [0.3214546624382897, 0.4413431944722916, 1.116938255577163]], dtype='float64');
r3=array([-0.281123816435695,
       -0.0007913649113678648,
       0.06262426439586841], dtype='float64');
t3=array([-722.5466679429371,
       -620.1083211270745,
       1755.026327972436], dtype='float64');
Covr3=array([[1.907554911360676e-07, -1.177914765153821e-08, -7.016775372096982e-09],
       [-1.177914765092724e-08, 1.53542579186026e-07, 2.169040256466957e-08],
       [-7.016775371985491e-09, 2.169040256468788e-08, 6.572081099289565e-09]], dtype='float64');
Covt3=array([[0.5563101775311149, 0.1120185643532978, 0.4305318765445191],
       [0.1120185643583354, 0.5644816679697156, 0.3843314640032873],
       [0.4305318765380877, 0.3843314639959308, 1.117224663880549]], dtype='float64');
r4=array([-0.4518589674197833,
       0.3313545211721403,
       -1.414743818426753], dtype='float64');
t4=array([-529.0227787389565,
       707.8404979408497,
       1740.59559941942], dtype='float64');
Covr4=array([[2.700573017376235e-07, -3.473024290180492e-08, 2.353884258260409e-09],
       [-3.473024290054435e-08, 1.490131477702113e-07, 3.587055659500205e-08],
       [2.353884258673481e-09, 3.587055659493957e-08, 1.333839863403211e-08]], dtype='float64');
Covt4=array([[0.5614070836752389, 0.134200097608657, 0.3549394986425307],
       [0.1342000976138208, 0.5628271069522029, 0.05567051105894257],
       [0.3549394986345347, 0.05567051105232006, 0.802161503999741]], dtype='float64');
r5=array([-0.771698747515781,
       0.8860891438265076,
       -1.223152929621762], dtype='float64');
t5=array([175.867284876508,
       407.228623444493,
       1984.288901920893], dtype='float64');
Covr5=array([[2.504008858998947e-07, -1.513101651758279e-08, 1.716507889819076e-08],
       [-1.513101651657648e-08, 1.455293923103448e-07, 6.531434253019175e-08],
       [1.716507889870549e-08, 6.531434253000696e-08, 4.698427319651814e-08]], dtype='float64');
Covt5=array([[0.7120265414131658, 0.1311205459153344, 0.2106842507003502],
       [0.1311205459214894, 0.7172685029452239, 0.07147875524490797],
       [0.210684250693003, 0.0714787552393048, 0.532596723622097]], dtype='float64');
r6=array([0.2780755797997456,
       -0.07041455414003982,
       0.06781862738012294], dtype='float64');
t6=array([-1319.098062603908,
       -144.9419909501424,
       2318.068527864158], dtype='float64');
Covr6=array([[3.676817941186056e-07, -3.280223905603707e-08, 2.8040336206439e-08],
       [-3.28022390543081e-08, 3.522260927114852e-07, -6.327285397064822e-08],
       [2.804033620604313e-08, -6.327285397071321e-08, 2.280493725111028e-08]], dtype='float64');
Covt6=array([[1.030283914890841, 0.2327012555757453, 0.7934070686047145],
       [0.2327012555857534, 1.161497436906982, 0.6637904965137312],
       [0.7934070685929346, 0.6637904964980612, 2.460951917694266]], dtype='float64');
r7=array([-0.08929305295347842,
       0.7635494917258887,
       -0.05707803461730139], dtype='float64');
t7=array([-679.2469754138709,
       74.13294422560239,
       2898.856684466514], dtype='float64');
Covr7=array([[3.477865378345605e-07, -2.685809156984653e-08, 5.690440242824654e-08],
       [-2.685809156644104e-08, 3.51665578441301e-07, -3.689441794313551e-08],
       [5.690440242791588e-08, -3.689441794430046e-08, 4.730727419626834e-08]], dtype='float64');
Covt7=array([[1.629930547067209, 0.3788916822578476, 0.9510628009934696],
       [0.378891682276133, 1.594870825809966, 0.5627505831809924],
       [0.9510628009803842, 0.5627505831641276, 1.661412566079267]], dtype='float64');
r8=array([-0.1662140050591442,
       -0.464833159325643,
       -0.5686761148480169], dtype='float64');
t8=array([-382.3363589088426,
       -195.6090749802753,
       1786.36639953467], dtype='float64');
Covr8=array([[4.583501155340675e-07, -5.482082780962774e-08, -7.147636320821849e-08],
       [-5.482082780848446e-08, 3.124826661839499e-07, -2.684248906935554e-09],
       [-7.147636320825679e-08, -2.684248906574598e-09, 3.757892235048338e-08]], dtype='float64');
Covt8=array([[0.6132927354302729, 0.1256186029821484, 0.4100284805418473],
       [0.1256186029876839, 0.59793148572552, 0.3271881567777633],
       [0.4100284805340224, 0.3271881567696243, 1.477827582546179]], dtype='float64');
